From 265452d49d1a004fb732b624f1f1e8496f75de7a Mon Sep 17 00:00:00 2001 From: Ewan Higgs Date: Mon, 30 Jan 2017 10:38:46 +0100 Subject: [PATCH] Remove unused 'file' function. --- src/cargo/util/paths.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/cargo/util/paths.rs b/src/cargo/util/paths.rs index 075a55a47..d47598a2e 100644 --- a/src/cargo/util/paths.rs +++ b/src/cargo/util/paths.rs @@ -2,7 +2,6 @@ use std::env; use std::ffi::{OsStr, OsString}; use std::fs::File; use std::fs::OpenOptions; -use std::io; use std::io::prelude::*; use std::path::{Path, PathBuf, Component}; @@ -68,10 +67,6 @@ pub fn without_prefix<'a>(a: &'a Path, b: &'a Path) -> Option<&'a Path> { } } -pub fn file(p: &Path, contents: &[u8]) -> io::Result<()> { - try!(File::create(p)).write_all(contents) -} - pub fn read(path: &Path) -> CargoResult { (|| -> CargoResult<_> { let mut ret = String::new(); -- 2.30.2